{% extends 'iframe/basePlus.html.twig' %}
{% block cardHeader %}
    编辑<a href="/Admin/FieldType/index" class="layui-btn layui-btn-sm" style="float:right;margin-top:6px;">列表</a>
{% endblock %}
{% block cardBody %}
    <form class="layui-form">
        <dry-common role="input" label="名称" name="dry_name" value="{{ rs.dry_name }}" placeholder="请输入名称"></dry-common>
        <dry-common role="input" label="类型" name="dry_type" value="{{ rs.dry_type }}" placeholder="请输入类型" help="如:varchar(255)"></dry-common>
        <dry-common role="input" label="范围开始" name="dry_start" value="{{ rs.dry_start }}" placeholder="请输入范围开始"></dry-common>
        <dry-common role="input" label="范围结束" name="dry_end" value="{{ rs.dry_end }}" placeholder="请输入范围结束"></dry-common>
        <dry-common role="radio" label="状态" name="dry_status" value="{{ rs.dry_status }}" url="/Api/Choice/getListByKey?key=status"></dry-common>
        <dry-common role="input" label="备注" name="dry_note" value="{{ rs.dry_note }}" placeholder="请输入备注"></dry-common>
        <dry-common role="input" label="排序" name="dry_sort" value="{{ rs.dry_sort }}" placeholder="请输入排序"></dry-common>
        <dry-common role="submit" submit="确定" reset="重置"></dry-common>
    </form>
    <script>
        layui.use(["dry"], function(dry){
            function getVerify()
            {
                var result = {
                    dry_name:function(value){if(value == ""){return "请输入名称";}}
                };
                return result;
            }

            dry.submit(getVerify(), "/Admin/FieldType/index", "/Api/FieldType/edit?id={{ rs.id }}");
        });
    </script>
{% endblock %}